ENT-13766: Fixes / improvements / security hardning#2131
Merged
larsewi merged 5 commits intocfengine:masterfrom Mar 9, 2026
Merged
ENT-13766: Fixes / improvements / security hardning#2131larsewi merged 5 commits intocfengine:masterfrom
larsewi merged 5 commits intocfengine:masterfrom
Conversation
The mv commands in cleanup() print confusing "cannot stat" errors when files don't exist, which is expected on first provisioning runs. Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Disable PermitRootLogin, PasswordAuthentication, and KbdInteractiveAuthentication in sshd_config to enforce key-only SSH access. This prevents brute force attacks on VMs exposed via autossh tunnels through the SSH bridge. Ticket: ENT-13766 Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Broaden epel-release from redhat_7/centos_7 only to all redhat/centos platforms. This is needed to install fail2ban (and potentially other EPEL packages) on RHEL 8/9/10. Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Install fail2ban on Debian/Ubuntu and RHEL/CentOS platforms to ban IPs with repeated failed SSH auth attempts. Configures sshd jail with 5 max retries, 1 hour ban time, and 10 minute find window. Ticket: ENT-13766 Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
olehermanse
reviewed
Mar 6, 2026
Contributor
craigcomstock
left a comment
There was a problem hiding this comment.
yes, I really think we need a refined sshd config module though... as still managing just sshd_config is not really sufficient. If some of these options are present in sshd_config.d they may come in first and "win". So we need to compare the RESULTING configuration aka ssh -G output which shows the resulting configuration.
craigcomstock
approved these changes
Mar 6, 2026
olehermanse
approved these changes
Mar 6, 2026
Contributor
Author
|
I will merge this and investigate sshd config module with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.